package com.woniu;


import com.woniu.config.ChatService;
import org.springframework.ai.chat.client.ChatClient;
import org.springframework.ai.tool.ToolCallbackProvider;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestClient;

/**
 * @Todo: 启动类，注册自己的Service包装类
 * @DateTime: 25/05/06/星期二 11:08
 **/
@SpringBootApplication
public class MCPClientApp {
    public static void main(String[] args) {
        SpringApplication.run(MCPClientApp.class, args);
    }
    @Bean
    public ChatService chatService(ChatClient.Builder chatClientBuilder, ToolCallbackProvider tools) {
        return new ChatService(chatClientBuilder, tools);
    }
    @Bean
    public RestClient.Builder restClientBuilder() {
        return RestClient.builder();
    }
}


